    import java.io.IOException;  
    import java.io.InputStream;  
    import java.util.Properties;  
      
    public class PropertiesLoader {  
      
        private Properties props;  
        private String marinho = "config.properties";  
      
        protected PropertiesLoader(){  
                props = new Properties();  
                InputStream in = this.getClass().getResourceAsStream(marinho);  
                try{  
                        props.load(in);  
                        in.close();  
                }  
                catch(IOException e){e.printStackTrace();}  
        }  
      
        protected String getValor(String chave){  
                return (String)props.getProperty(chave);  
        }  
    }  
